//
// Created by Administrator on 2023/8/2.
//


#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
class Solution {
public:
    bool divideArray(vector<int> &nums) {
        // 统计nums中出现的数字的次数
        unordered_map<int, int> map;
        for (int num : nums) {
            map[num]++;
        }
        // 判断次数是不是都是偶数
        for (auto &item : map) {
            if (item.second % 2 != 0) {
                return false;
            }
        }
        return true;
    }
};

int main() {
    Solution s;
    vector<int> nums = {1, 2, 3, 4, 5,6};
    cout << s.divideArray(nums) << endl;
    return 0;

}